import formBuilder from "@/comps/form/formBuilder";
import api from "./api";
import apiItemBase from "../../ItemBase/js/api";
import apiAttribute from "../../AttributeKey/js/api";

export default {
    main:function () {
        let fb = formBuilder()
        fb.setLabelWidth(100)

        fb.addSearch("itemBaseId","物资",6)
            .setApi(apiItemBase.urlChoice).setApiSearchKeys(["name__like"])
        fb.addSearch("attributeId","属性",6)
            .setApi(apiAttribute.urlChoice).setApiSearchKeys(["name__like"])
        fb.addText("code").setSpan(3).setLabel("编码")
        fb.addText("sort").setSpan(3).setLabel("排序").setTypeNumber()
        fb.addText("values","值",12).setRows(3).setMulti(true)
            .setTips("后台生成的字段，在不完全明确其工作原理时，非必要不要修改")
        return fb
    },
    other:function () {
        let fb = formBuilder()
        fb.setLabelWidth(100).setLabelPosition("right")

        return fb
    }
}